﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Secams.controller;
using Secams.model;

namespace Secams.form
{
    public partial class FormSimulCompleted : Form
    {
        ParticipantInfo _participantInfo = null;

        public FormSimulCompleted(ParticipantInfo participantInfo)
        {
            this.Font = AppContext.getDefaultFont(this.Font);
            InitializeComponent();

            _participantInfo = participantInfo;

            this.txtTrainScoreTotal.Text = _participantInfo.scoreTrain.ToString();
            this.txtTrainScoreTotal.TextAlign = HorizontalAlignment.Right;
            this.txtTransScoreTotal.Text = _participantInfo.scoreTransfer.ToString();
            this.txtTransScoreTotal.TextAlign = HorizontalAlignment.Right;
        }

        private void btnAdminLogin_Click(object sender, EventArgs e)
        {
            string role = SignOnManager.getInstance().signIn("admin", this.txtAdminPassword.Text);
            if (role.Equals("admin"))
            {
                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            }
            
        }
    }
}
